<template>
	<el-container style="height:100%;width: 100%;overflow:hidden;">
		<el-aside width="180px"
			style="background-color: rgb(238, 241, 246);height:100%;overflow-y: auto;overflow-x: hidden;">
			<el-menu default-active="1" @select="handleSelect">
				<el-menu-item index="1">
					<template slot="title"><i class="el-icon-s-management"></i>课程管理</template>
				</el-menu-item>
				<el-menu-item index="2">
					<template slot="title"><i class="el-icon-video-camera-solid"></i>在线直播</template>
				</el-menu-item>
				<el-menu-item index="3">
					<template slot="title"><i class="el-icon-s-ticket"></i>在线录播</template>
				</el-menu-item>
				<el-submenu index="4">
					<template slot="title">
						<i class="el-icon-s-unfold"></i>
						<span>考试中心</span>
					</template>
					<el-menu-item index="4-1">考试题库</el-menu-item>
					<el-menu-item index="4-2">考试试卷</el-menu-item>
				</el-submenu>
				<el-submenu index="5">
					<template slot="title">
						<i class="el-icon-s-custom"></i>
						<span>学员管理</span>
					</template>
					<el-menu-item index="5-1">辖区单位信息</el-menu-item>
					<el-menu-item index="5-2">住户信息</el-menu-item>
				</el-submenu>
			</el-menu>
		</el-aside>
		<el-container class="rcont">
			<el-main class="maindiv">
				<iframe class="innerdiv" :src="innersrc"></iframe>
			</el-main>
		</el-container>
	</el-container>
</template>

<script>
	export default {
		data() {

			return {
				innersrc: '/admin/examview/course',
				roles: []
			}
		},
		mounted() {},
		methods: {
			handleSelect(key, keypath) {
				console.log(key)
				if (key == 1) {
					this.innersrc = '/admin/examview/course' +`?temptime=${new Date().getTime()}`
				} else if (key == 2) {
					this.innersrc = '/admin/examview/live' +`?temptime=${new Date().getTime()}`
				}else if (key == 3) {
					this.innersrc = '/admin/examview/video' +`?temptime=${new Date().getTime()}`
				}else if (key == '4-1') {
					this.innersrc = '/admin/examview/index' +`?temptime=${new Date().getTime()}`
				}else if (key == '4-2') {
					this.innersrc = '/admin/examview/list' +`?temptime=${new Date().getTime()}`
				}else if (key == '5-1') {
					this.innersrc = '/admin/company/comlist2' +`?temptime=${new Date().getTime()}`
				}else if (key == '5-2') {
					this.innersrc = '/admin/company/residentlist2' +`?temptime=${new Date().getTime()}`
				}
			}
		}
	};
</script>

<style>
	.el-header {
		background-color: #B3C0D1;
		color: #333;
		line-height: 60px;
	}

	.maindiv {
		padding: 2px !important;
		background-color: #fff;
		overflow: hidden;
	}

	.el-aside {
		color: #333;
	}

	.rcont {
		height: 100%;
		overflow-y: auto;
	}

	.innerdiv {
		width: 100%;
		height: 100%;
		overflow: auto;
		border: none;
	}
</style>
